program dvekas;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  x0, y0, x1, y1, ra, rb, r1, r2, k1, k2 :integer;
  a1, b1, a2, b2, c1, c2, a3, b3, a4, b4, c3, c4, d :real;
begin
  writeln('Enter x0:');
  readln(x0);

  writeln('Enter y0:');
  readln(y0);

  writeln('Enter x1:');
  readln(x1);

  writeln('Enter y1:');
  readln(y1);

  writeln('Enter r1:');
  readln(r1);

  writeln('Enter r2:');
  readln(r2);

  k1:=x1-x0;
  k2:=y1-y0;

  d:=sqrt(k1*k1+k2*k2);
  ra:=r2-r1;

  a1:=(ra*k1+k2*sqrt(d*d-ra*ra)) / (d*d);
  b1:=(ra*k2-k1*sqrt(d*d-ra*ra)) / (d*d);

  a2:=(ra*k1-k2*sqrt(d*d-ra*ra)) / (d*d);
  b2:=(ra*k2+k1*sqrt(d*d-ra*ra)) / (d*d);

  c1:=(-b1*y0-a1*x0)+r1;
  c2:=(-b2*y0-a2*x0)+r2;

  rb:=r2+r1;

  a3:=(rb*k1+k2*sqrt(d*d-rb*rb)) / (d*d);
  b3:=(rb*k2-k1*sqrt(d*d-rb*rb)) / (d*d);

  a4:=(rb*k1-k2*sqrt(d*d-rb*rb)) / (d*d);
  b4:=(rb*k2+k1*sqrt(d*d-rb*rb)) / (d*d);

  c3:=(-b3*y0-a3*x0)+r1;
  c4:=(-b3*y0-a4*x0)+r2;

  writeln(a1:0:2, ' ',b1:0:2, ' ',c1:0:2);
  writeln(a2:0:2, ' ',b2:0:2, ' ',c2:0:2);

  writeln(a3:0:2, ' ',b3:0:2, ' ',c3:0:2);
  writeln(a4:0:2, ' ',b4:0:2, ' ',c4:0:2);

  readln;
end.
